﻿// VxWork.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include <iostream>
#include "VxDriver.h"
#include <memory>
#include <string.h>
#include "MsgProcess.h"
#include <UserMgr.h>

std::shared_ptr<VxDriver> gVxDriver;
std::shared_ptr<UserMgr> gUserMgr;

int main()
{
    int ret;

    gVxDriver = std::make_shared<VxDriver>();
    gUserMgr = std::make_shared<UserMgr>(gVxDriver);

    ret = gVxDriver->DriveInit();
    ret = gVxDriver->UseUtf8();
    if (gVxDriver->IsSupport())
    {
        ret = gVxDriver->InitWxWorkSocket(
            (void*)&vxWorkClinetConnet,
            (void*)&vxWorkClinetRecviceData,
            (void*)&vxWorkClinetClose);
        gVxDriver->AutoHook();
        while (true)
        {
            getchar();
            ret = gVxDriver->InjectWxWorkMultiOpen();
        }
    }
}

